package com.ruoyi.product.service.impl;

import com.ruoyi.product.domain.Product;
import com.ruoyi.product.mapper.ProductMapper;
import com.ruoyi.product.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
//23201012827 -魏巍
@Service
public class ProductServiceImpl implements ProductService {

    @Autowired
    ProductMapper mapper;//servicel要调用mapper的方法，所以需要进来
//查询饮品 2827魏巍
    @Override
    public List<Product> getProductList(Product p) {

        return mapper.getProductList(p);
    }
//新增饮品 2827魏巍
    @Override
    public int addProduct(Product p) {
        return mapper.addProduct(p);
    }
//修改饮品 2827魏巍
    @Override
    public int updateProduct(Product p) {

        return mapper.updateProduct(p);
    }
//删除饮品 2827魏巍
    @Override
    public int deleteProduct(int id) {

        return mapper.deleteProduct(id);
    }



}


